package com.cdtye.shuoh.domain.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum TLVDeviceType {
    TEMPERATUREHUMIDITY("TEMPERATUREHUMIDITY","10","TEMP"),
    DISPLACEMENT("DISPLACEMENT","A","DPMT"),
    DISTANCE("DISTANCE","B","RANG"),
    INCLINATIONVIBRATION("INCLINATIONVIBRATION","52","DPVN");


    private  String key;
    private  String value;
    private String model;

    public static TLVDeviceType parseByValue(String value){
        if(value == null){
            return null;
        }
        for (TLVDeviceType d : TLVDeviceType.values()) {
            if (d.getValue().equals(value.toUpperCase())) {
                return d;
            }
        }
        return null;

    }
}
